package xworker.javafx;

import javafx.scene.control.TableView;
import xworker.javafx.beans.property.PropertyFactory;

public class PropertiesThingGenerater {
    static{
        PropertyFactory.regist(TableView.class, "onSortProperty", o -> {
            TableView<?> obj = (TableView<?>) o;
            return obj.onSortProperty();
        });
        PropertyFactory.regist(TableView.class, "onScrollToProperty", o -> {
            TableView<?> obj = (TableView<?>) o;
            return obj.onScrollToProperty();
        });
        PropertyFactory.regist(TableView.class, "onScrollToColumnProperty", o -> {
            TableView<?> obj = (TableView<?>) o;
            return obj.onScrollToColumnProperty();
        });
    }

    public static void main(String[] args){
        try{

            System.out.println(PropertyFactory.generateRegistJavaCode(javafx.scene.control.ButtonBar.class));

            System.out.println(PropertyFactory.generateProperiesChildThingCode(javafx.scene.control.ButtonBar.class));
        }catch(Exception e){
            e.printStackTrace();
        }
    }
}
